package messages;

import java.util.Collection;

import core.PluginInfo;


/**
 * ListPluginsReplyMessage
 *
 * Message sent by the server with the list of available plugins.
 */
public class ListPluginsReplyMessage extends Message {

	public ListPluginsReplyMessage(Collection<PluginInfo> pluginsInfo) {
		super();
		
		this.plugins = pluginsInfo;
	}

	
	/**
	 * Returns the list of available plugins.
	 * 
	 * @return The list of available plugins.
	 */
	public Collection<PluginInfo> getPlugins() {
		return this.plugins;
	}

	
	public String toString() {
		String s = super.toString() + " ";
		
		for (PluginInfo plugin : plugins) {
			s += "[" + plugin.getName() + "] ";
		}
		
		return s;
	}
	
	
	private Collection<PluginInfo> plugins;	// List of available plugins.

	private static final long serialVersionUID = 1L;	
}
